Skip to content

🧰🧩🎨: reconciliation follow-ups and workspace component editing - #1842

Open
merryman wants to merge 7 commits into
robin/reconciliation-refactorfrom
robin/reconciliation-followups
Open

merryman wants to merge 7 commits into
robin/reconciliation-refactorfrom
robin/reconciliation-followups

Conversation

@merryman

@merryman merryman commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Components declared in a local Workspace can now be edited visually through Edit component…. Active top-level declarations are protected by anchored ranges in Workspaces and the System Browser, while surrounding code remains editable. Direct descriptor .edit() sessions receive the same protection.

Text edits are checked before mutation, including paste, whole-buffer replacement and text undo/redo. Generated source changes join component transactions. Manual edits outside an active declaration update the shared buffer and invalidate dependent component history with a visible notice. Matching full-source editors stay synchronized, and closing a session preserves manual browser edits for explicit saving.

Session close, editor removal and declaration reevaluation release controls and trackers. Closing a session prunes component history that depends on its shared source modules, including transitive derived-module dependencies, across undo, redo and active groups. Current edits are retained; unrelated morph and independent-module history remain usable. Copied editors omit live session guards and controls.

Additional reconciliation corrections:

  • Refresh saved module source independently of notification-listener order and resolve static parent imports through the session loader, including package and namespace imports.
  • Activate dormant derived overrides atomically when a component introduces their target node, with exact source/runtime undo and redo.
  • Suppress already compensated original notifications and complete fallback notification delivery before reversing rejected work.
  • Reuse validated import bindings during component drags, invalidating them when source or imports change. Preserve drag coalescing and exact replay.
  • Preserve the trailing newline when document replacement extends beyond the previous final line.

Regressions cover declaration protection, simultaneous sessions, manual/generated edits, reevaluation and cleanup, shared-history pruning, dormant overrides, source refresh, rejection recovery and exact undo/redo. Focused Workspace and direct-manipulation tests pass.

Closes #1121.

Refs #1149: structural reconciliation follow-ups are included; replacement generation, ordering added children among implicit inherited siblings, and remaining layout-reference and inherited-restoration cases stay open. Source parsing and projection still occur during drag events.

@merryman
merryman force-pushed the robin/reconciliation-followups branch from 05e90b9 to a0ae348 Compare October 17, 2026 13:54
@merryman
merryman force-pushed the robin/reconciliation-followups branch from a0ae348 to 5ed0010 Compare October 17, 2026 14:29
@merryman
merryman force-pushed the robin/reconciliation-followups branch from 5ed0010 to 1152832 Compare October 18, 2026 10:53
@merryman
merryman added this pull request to stack #1849 October 19, 2026 11:16
@merryman
merryman force-pushed the robin/reconciliation-followups branch from 1152832 to 4f92639 Compare October 21, 2026 06:49
@merryman
merryman force-pushed the robin/reconciliation-followups branch from 4f92639 to daf82b8 Compare October 22, 2026 13:38
@merryman merryman changed the title 🧰🎨: reconciliation follow-ups for #1810 🧰🧩🎨: reconciliation follow-ups and workspace component editing Oct 25, 2026
@merryman merryman closed this Oct 28, 2026
@merryman merryman reopened this Oct 28, 2026
@merryman
merryman force-pushed the robin/reconciliation-followups branch from 839795e to c46bdfc Compare November 2, 2026 15:07
Recover saved source independently of module cache eviction listener order.
Identify session-owned projectional entries and preserve their ownership
through coalescing when pruning ended sessions.

The morphic tests characterize the interrupted-group closure and nested
domain pruning already provided by the S5 foundation.
Resolve coalesced scalar targets from the current editable, and build replay
callbacks outside planning scopes that retain committed target maps.
Use the foundation notification hooks when compensating rejected component
edits; keep ordinary delivery order and one visible rejection.

The morphic boundary tests characterize S5 notification semantics.
Reuse the editing session loader normalization used for export identity
when the component resolver cannot resolve a parent expression. Compare
normalized module ids and keep successful resolver identities authoritative.

Carry the injected normalizer through source reparses, derived propagation
and generated-name checks. Pure callers retain the existing strict fallback.

Cover named and namespace package imports, true mismatches, both derived
planners, and a real namespace-parent edit with cold instances and exact
source/runtime undo and redo. Fixes FU-T7a.
Evaluate planned parent and derived policies to synthesize an introduced
subtree when copying the base cannot represent its local overrides. Keep
plain introductions on the existing copy path and connect synthesized
inline policies to the atomic cache transaction for subsequent edits.

Retain activated-override templates for closed sessions and rebind replay
to the current editable by name path. Preserve atomic rejection, prior
history, exact source undo/redo and tooling removal of derived overrides.
Keep resolved binding specifiers across validated edits inside a component
body, preserving source identity checks and invalidation on saved source
or inserted imports. Discard the old import AST and retain full projection
and semantic validation.

Cover lookup reuse, import insertion and saved-specifier invalidation with
real edit sessions, cold instances and exact source/runtime undo and redo.
Remove tracker-owned undo and redo entries connected by whole-module
source preconditions when a component editing session closes. Follow
transitive derived-module plans before pruning, and preserve unrelated
history within composite groups and active recorders.

Keep current source, live and policy state unchanged. Show a status message
when dependent history from another component session is removed instead
of leaving a stale, throwing undo or redo.

Cover same-module undo/redo conflicts, interleaving, mixed and active groups,
independent modules, unedited-session controls and derived dependencies.
Reuse component edit controls in local workspaces and protect active
top-level declarations with anchored ranges in workspace and browser
editors. Keep surrounding code editable, synchronize matching source
editors, and prune component history invalidated by manual source edits.

Preflight whole-value text edits and typed undo/redo before mutation,
while preserving atomic compensation. Keep generated source out of the
editor's independent text history and preserve trailing newlines when a
multiline replacement extends the document.

Release source guards and controls on close, removal and reevaluation;
exclude runtime session state from copied editors. Cover the existing
descriptor API, workspace UI entry points, source/runtime replay, text
guards and lifecycle regressions.

Refs #1121.
@merryman
merryman force-pushed the robin/reconciliation-followups branch from c46bdfc to 700e4b1 Compare November 5, 2026 10:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconciliation for components defined in a workspace

1 participant